/// @file Pattern.h
#pragma once
#include <gui/TanContainer.h>
#include <core/ContainerWidget.h>
#include <core/TanPainter.h>
#include <QStyleOption>

namespace qtangram
{
    /**
      @class Pattern
      @brief Widget that displays pattern
    */
class Pattern : public ContainerWidget, public TanContainer
{
    Q_OBJECT
public:
    Pattern(double viewRange, QWidget* parent = 0);
    Pattern(QWidget* parent = 0);
    void paintEvent(QPaintEvent *);
    void clearPattern() { patternPolygon.clear(); }
public slots:
    void setPatternPolygon(QLinkedList<Tan> tans);
protected:
    QLinkedList<Tan> patternPolygon;
};
}

